package tuanvn.iti.vn;

import java.util.List;

import mrtran.iti.vn.Main;
import mrtran.iti.vn.Main.GameView;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;

public class SpriteHP {
	private static final int BMP_COLUMNS_HP = 3;

	int  currentFrameHp = 0;
	private GameView gameView2;
	private Bitmap hp;
	
	public static int widthHp;
	public static int heightHp;
	private List<SpriteHP> spriteHP;
	int xSpeedHp = 0, ySpeedHp = 0;
	int xHp=Main.SCREENWIDTH/60,yHp = Main.SCREENHEIGHT/35;
	public static int mlife=20;
	
	public SpriteHP(GameView gameView2, Bitmap hp,List<SpriteHP> spriteHP) {
		this.gameView2 = gameView2;
		this.hp = hp;
		this.widthHp = hp.getWidth() ;
		this.heightHp = hp.getHeight();
		this.spriteHP = spriteHP;
		
	}

	private void update() {
	

	}
	
	public void onDraw(Canvas canvas) {
		
		update();
		int srcXhp = currentFrameHp * widthHp;
		Rect srcHp = new Rect(srcXhp, 0, srcXhp + widthHp, 0 + heightHp);
		Rect dstHp = new Rect(xHp, yHp, xHp + widthHp, yHp + heightHp);
		canvas.drawBitmap(hp, srcHp, dstHp, null);

	}

}